﻿#pragma once

#include <QWidget>
#include "ui_ShareItemView.h"
#include "Screenshot/Screenshot.h"

class ShareItemView : public QWidget
{
    Q_OBJECT

public:
    ShareItemView(QWidget *parent = Q_NULLPTR);

    void setData(const Capturer& inData);

    Capturer& data()
    {
        return _data;
    }

    // 设置选中状态
    void setSelected(bool inSelected);

    bool selected()
    {
        return _selected;
    }

signals:
    void clicked(ShareItemView* item);

protected:
    void mousePressEvent(QMouseEvent* event) override;

private:
    Ui::ShareItemView ui;
    bool _selected;
    Capturer _data;
};
